From: Dan Winship Date: Thu, 9 Sep 2010 20:18:07 +0000 (-0400) Subject: [MessageTray] show newly-added sources even if they don't post notifications X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9724 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=82e6f9c8d6e386662e61910e0ea0f5b331ec39ca;p=gnome-shell.git [MessageTray] show newly-added sources even if they don't post notifications eg, when a trayicon is added, show the summary briefly https://bugzilla.gnome.org/show_bug.cgi?id=608869 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index d3be97344..3546fa724 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -4,6 +4,7 @@ const Clutter = imports.gi.Clutter; const Gtk = imports.gi.Gtk; const Lang = imports.lang; const Mainloop = imports.mainloop; +const Meta = imports.gi.Meta; const Pango = imports.gi.Pango; const Shell = imports.gi.Shell; const Signals = imports.signals; @@ -983,6 +984,12 @@ MessageTray.prototype = { function () { this.removeSource(source); })); + + // We need to display the newly-added summary item, but if the + // caller is about to post a notification, we want to show that + // *first* and not show the summary item until after it hides. + // So postpone calling _updateState() a tiny bit. + Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { this._updateState(); return false; })); }, removeSource: function(source) {